import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const globalStore = defineStore('global', () => {
  const menuActive = ref(1)
  const scriptTypeList = ref([])

  // const doubleCount = computed(() => count.value * 2)

  function changeMenu(val) {
    menuActive.value = val
    localStorage.setItem('menuActive', val);
  }
  function changeScriptType(val) {
    scriptTypeList.value = val
  }

  return {
    menuActive,
    changeMenu,
    scriptTypeList,
    changeScriptType
  }
})
